<?php
// 本类由系统自动生成，仅供测试用途
class FrameAction extends Action {

    private $cAdmin = null;

	function __construct(){
		//判断管理员登录状态
		admin_login_check();

        import("@.ORG.Admin");
        $this->cAdmin = new Admin();

	}
	
	public function top(){

		$admin = $this->cAdmin->logged_info();
		
    	$this->assign(
    		array(
    			'admin'	=> $admin
    		)
    	);
    	
		$this->display('Common:header');
    }
    
   	public function menu(){

        //判断是否是刷手
        $is_operator = false;
        if($this->cAdmin->is_group_code('operator')){
            $is_operator = true;
        }

		//已有的权限
	
		$menu = array(
		
			'Task:index'				=> has_role('Task:index'),			
			'Task:add'					=> has_role('Task:add'),

            'JdRank:index'		        => has_role('JdRank:index'),

			'Plantform:index'			=> has_role('Plantform:index'),		
			'Plantform:add'				=> has_role('Plantform:add'),		
					
			'Users:index'				=> has_role('Users:index'),			
			'Users:add'					=> has_role('Users:add'),			
						
			'UserAddress:index'			=> has_role('UserAddress:index'),	
			'UserAddress:add'			=> has_role('UserAddress:add'),		
				
			'Member:index'				=> has_role('Member:index'),		
			'Member:add'				=> has_role('Member:add'),
						
			'Keywords:index'			=> has_role('Keywords:index'),		
			'Keywords:add'				=> has_role('Keywords:add'),		
					
			'Admin:index'				=> has_role('Admin:index'),
			'Admin:add'					=> has_role('Admin:add'),
		
			'AdminGroups:index'			=> has_role('AdminGroups:index'),
			'AdminGroups:add'			=> has_role('AdminGroups:add'),
		
		
			'Logs:index'				=> has_role('Logs:index'),

            'Task:edit_pay_status'		=> has_role('Task:edit_pay_status')

		);
		


		$this->assign(
    		array(
    			'menu'		    => $menu,
                'is_operator'   => $is_operator
    		)
    	);
		
		$this->display('Common:menu');
    }
    
    public function drag(){
    	$this->display('Common:drag');
    } 
    
   	public function main(){
		
		redirect('/index.php/Admin/Order/',0);
    }
    
}
?>